//
//  Label.swift
//  BaseModule_Example
//
//  Created by seven on 2020/7/2.
//  Copyright © 2020 CocoaPods. All rights reserved.
//

import UIKit
public extension UILabel {
    
    class func withText(_ text: String?, fontSize f: CGFloat, color c: UIColor?, frame fm: CGRect) -> Self {
        let label = self.init()
        label.text = text
        label.font = UIFont.systemFont(ofSize: f)
        label.textColor = c
        label.frame = fm
        return label
    }
    
}
public extension UILabel {
    
    var tt_font: CGFloat {
        set {
            self.font = UIFont.systemFont(ofSize: fit(newValue))
        }
        get {
            self.font?.pointSize ?? 0
        }
    }
    
}
